<%#
<!-- Copyright (C) 2020  Matthew "strager" Glazar -->
<!-- See end of file for extended copyright information. -->
%>

<h2 id="install-neovim-plugin"><%= step %>. Install Neovim plugin</h2>
<p>Install this plugin with your favorite Neovim packaging system:</p>

<ul class="tab-bar">
  <li class="tab-bar-button">
    <a
      role="tab"
      onclick="changePackageManager(event, 'manual-neovim-package')"
      href="#manual-neovim-package"
      >Neovim package</a
    >
  </li>
  <li class="tab-bar-button">
    <a
      role="tab"
      onclick="changePackageManager(event, 'manual-neovim-dein-vim')"
      href="#manual-neovim-dein-vim"
      >dein.vim</a
    >
  </li>
  <li class="tab-bar-button">
    <a
      role="tab"
      onclick="changePackageManager(event, 'manual-neovim-packer-nvim')"
      href="#manual-neovim-packer-nvim"
      >packer.nvim</a
    >
  </li>
  <li class="tab-bar-button">
    <a
      role="tab"
      onclick="changePackageManager(event, 'manual-neovim-vim-plug')"
      href="#manual-neovim-vim-plug"
      >Vim-Plug</a
    >
  </li>
</ul>

<div id="manual-nothing-selected" class="show-with-js package-manager">
  <p>Choose a Neovim package manager above to get started!</p>
</div>

<div id="manual-neovim-package" class="package-manager" role="tabpanel">
  <h4 class="hide-with-js">Install as a Neovim package</h4>
  <p>This option requires Neovim 0.5.0 or newer.</p>
  <ol>
    <li>
      <a
        href="https://c.quick-lint-js.com/releases/<%= qljsVersionInfo.version %>/vim/quick-lint-js-vim.zip"
        >Download the quick-lint-js Neovim plugin.</a
      >
    </li>
    <li>
      Create the directory <% if (os === "windows") { %>
      <code>%LOCALAPPDATA%\nvim\pack\external\start\</code>. <% } else { %>
      <code>~/.local/share/nvim/site/pack/external/start/</code>. <% } %>
    </li>
    <li>
      Copy the extracted
      <code>quick-lint-js.vim</code> directory into the <% if (os === "windows")
      { %>
      <code>%LOCALAPPDATA%\nvim\pack\external\start\</code>
      <% } else { %>
      <code>~/.local/share/nvim/site/pack/external/start/</code>
      <% } %> directory.
    </li>
    <li>Restart Neovim.</li>
  </ol>
</div>

<div id="manual-neovim-dein-vim" class="package-manager" role="tabpanel">
  <h4 class="hide-with-js">Install with dein.vim</h4>
  <p>
    This option requires
    <a href="https://github.com/Shougo/dein.vim">dein.vim</a>.
  </p>
  <ol>
    <li>
      Add the following line to your <% if (os === "windows") { %>
      <code>%LOCALAPPDATA%\nvim\init.vim</code> file <% } else { %>
      <code>~/.config/nvim/init.vim</code> <% } %> file between
      <code class="vim">call dein#begin(...)</code> and
      <code class="vim">call dein#end()</code>:
      <blockquote>
        <pre><code class="vim">call dein#add('quick-lint/quick-lint-js', {'rtp': 'plugin/vim/quick-lint-js.vim', 'rev': '<%= qljsVersionInfo.version %>'})</code></pre>
      </blockquote>
    </li>
    <li>Restart Neovim.</li>
    <li>In Neovim, run <code class="vim">:call dein#install()</code>.</li>
  </ol>
</div>

<div id="manual-neovim-packer-nvim" class="package-manager" role="tabpanel">
  <h4 class="hide-with-js">Install with packer.nvim</h4>
  <p>
    This option requires
    <a href="https://github.com/wbthomason/packer.nvim">packer.nvim</a>.
  </p>
  <ol>
    <li>
      Add the following line to your <% if (os === "windows") { %>
      <code>%LOCALAPPDATA%\nvim\lua\plugins.lua</code> file <% } else { %>
      <code>~/.config/nvim/lua/plugins.lua</code> <% } %> file between
      <code class="lua">require('packer').startup(function()</code> and
      <code class="lua">end)</code>:
      <blockquote>
        <!-- HACK(strager): Semantically, opt=true makes no sense. We use opt=true
             to work around Neovim automatically loading plugin/vim/test.vim (a
             script which causes Neovim to exit on start). However, opt=true
             packages seem to be loaded by ALE by default anyway, because of the
             rtp option. -->
        <pre><code class="lua">use {'quick-lint/quick-lint-js', rtp = 'plugin/vim/quick-lint-js.vim', tag = '<%= qljsVersionInfo.version %>', opt = true}</code></pre>
      </blockquote>
    </li>
    <li>Restart Neovim.</li>
    <li>In Neovim, run <code class="vim">:PackerSync</code>.</li>
  </ol>
</div>

<div id="manual-neovim-vim-plug" class="package-manager" role="tabpanel">
  <h4 class="hide-with-js">Install with Vim-Plug</h4>
  <p>
    This option requires
    <a href="https://github.com/junegunn/vim-plug">Vim-Plug</a>.
  </p>
  <ol>
    <li>
      Add the following line to your <code>vimrc</code> file between
      <code class="vim">call&nbsp;plug#begin(...)</code> and
      <code class="vim">call&nbsp;plug#end()</code>:
      <blockquote>
        <pre><code class="vim">Plug 'quick-lint/quick-lint-js', {'rtp': 'plugin/vim/quick-lint-js.vim', 'tag': '<%= qljsVersionInfo.version %>'}</code></pre>
      </blockquote>
    </li>
    <li>Restart Neovim.</li>
    <li>In Neovim, run <code class="vim">:PlugInstall</code>.</li>
  </ol>
</div>

<%- await include("../common-manual-tabs.ejs.html") %> <%#
<!--
quick-lint-js finds bugs in JavaScript programs.
Copyright (C) 2020  Matthew "strager" Glazar

This file is part of quick-lint-js.

quick-lint-js is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

quick-lint-js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with quick-lint-js.  If not, see <https://www.gnu.org/licenses/>.
-->
%>
